#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int N=0;
    int A[10];
    int n=0;
    A[0]=1;
    A[2]=1;
    for(int i=2;i<10;i++)
    A[i]=A[i-2]+A[i-1];
    cout<<"N=8, ";
    while(N<8)
    {
        N=A[n];
        n++;
    }
    cout<<"K= "<<n;
    return a.exec();
}
